
var homepage_ad_container = document.getElementById("homepage_ad_container");
$(function () {
    ajax.get("/ad/homepage", {

        success: function (resp) {
            var data = resp.data;
            log("首页广告", data);
            // 0: {img: "/img/ad/ukf.png", name: "优客服", html: "", personid: 18, remark: "2018-04-18 --> 2019-06-18", …}1: {img: "/img/ad/yn.png", name: "杭州英尼网络技术有限公司", personid: 0, id: 18, url: "http://www.yingni.net.cn/index.html"}length: 2__proto__: Array(0)
            var html = "";
            for (var index = 0; index < data.length; index++) {
                var e = data[index];
                html += '<div class="layui-col-md2">';
                html += '     <a href="${api_ctx}/ad/' + e.id + '${api_suf}?referer=' + encodeURIComponent(location.href) + '" target="_blank" rel="noopener noreferrer">';
                html += '         <img src="' + res_url(e.img) + '" title="' + e.title + '" class="tio-ad">';
                html += '     </a>';
                html += '</div>';
            }
            homepage_ad_container.innerHTML = html;

        }
    });
});